package com.haoze.nurseapp.dao;

import com.haoze.common.mapper.MyMapper;
import com.haoze.common.model.OrdersFileIndexDataEntity;
import com.haoze.nurseapp.dto.FileIndexDataDTO;
import com.haoze.nurseapp.dto.task.OrdersFileIndexDataDTO;
import com.haoze.nurseapp.vo.EmrFile;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrdersFileIndexDataMapper extends MyMapper<OrdersFileIndexDataEntity> {

    void removeDeletedNodes(@Param("emrFileId") String emrFileId, @Param("dataVersion") Integer dataVersion);

    OrdersFileIndexDataEntity selectFileIndexDataByElementId(@Param("elementId") String elementId, @Param("emrFileId") String newEmrFileId);

    List<OrdersFileIndexDataDTO> selectDataByEmrFileId(@Param("emrFileId") String emrFileId);

    void insertAllFileIndexData(@Param("saveList") List<OrdersFileIndexDataEntity> saveList);

    List<FileIndexDataDTO> getAllFileIndexDataByTask(@Param("taskExecuteId") String taskExecuteId, @Param("executeDetailId") String executeDetailId);

    void updateEmrFileDataByInpatorderdataId(@Param("inpatorderdataId") String inpatorderdataId, @Param("batchNo") String batchNo);
    void updateEmrFileDataSealingTubeByInpatorderdataId(@Param("inpatorderdataId") String inpatorderdataId, @Param("batchNo") String batchNo);

    void updateXSCZByInpatorderdataId(@Param("inpatorderdataId") String inpatorderdataId, @Param("batchNo") String batchNo);
    void updateSYWCByInpatorderdataId(@Param("inpatorderdataId") String inpatorderdataId, @Param("batchNo") String batchNo);

    Integer selectCountByTest(@Param("newEmrFileId") String newEmrFileId, @Param("dataVersion") Integer dataVersion);
}
